namespace PaymentApproval {
  export interface SearchForm extends Base.Pagination {
    order?: string;
    sort?: string;
    beforePageNum: number;
    waybillNum: string;
    payableStatementNumber: string;
    agentIdList: string[];
    statementType: string;
    companyIdList: string[];
  }
  export type SearchParams = {
    pageNum: number;
    pageSize: number;
    beforePageNum: number;
    waybillNum: string[];
    payableStatementNumber: string[];
    agentIdList: string[];
    statementType: string;
    statusList: string[];
    companyIdList: string[];
  };
  type ToBeRequestedListRow = {
    id: string;
    paymentBillNumber: string;
    payableStatementNumber: string;
    companyName: string;
    agent: string;
    statementType: number;
    payableAmount: number;
    surplusPayableAmount: number;
    shipmentCount: number;
    biller: string;
    billTime: string;
  };
  export type ApprovalListRow = {
    createBy: number;
    createName: string;
    createTime: string;
    updateBy: number;
    updateName: string;
    updateTime: string;
    id: string;
    tenantId: number;
    applyNo: string;
    agentId: number;
    agent: string;
    companyId: number;
    companyName: string;
    paymentAmount: number;
    paymentDescription: string;
    applyStatus: number;
    applyResult: string;
    applyBy: number;
    applyName: string;
    applyTime: string;
    sum: number;
  };
  export type ListRows = ToBeRequestedListRow | ApprovalListRow;
  export type ApplyInfo = {
    id: string;
    paymentBillNumber: string;
    payableStatementNumber: string;
    companyName: string;
    agent: string;
    surplusPayableAmount: number;
    payableAmount: number;
    createTime: string;
    createName: string;
    payableAmountSum: number;
    receivableAmountSum: number;
    grossProfit: number;
    statementShipmentListRes: {
      id: number;
      waybillId: number;
      waybillNum: string;
      service: string;
      destination: string;
      settlementWeight: number;
      payableAmount: number;
      payableAmountSum: number;
      receivableAmount: number;
      grossProfit: number;
      profit: number;
      discountFormula: string;
      productRatio: string;
      status: number;
      serviceDifferent: number;
      destinationDifferent: number;
      weightDifferent: number;
    }[];
  };
  export type ApplyPatmentForm = {
    paymentAmount: number;
    paymentDescription: string;
    payableStatementShipmentIdList: string[];
  };
  export type ApplyCostInfo = {
    id: string;
    paymentBillNumber: string;
    payableStatementNumber: string;
    agent: string;
    payableAmount: number;
    surplusPayableAmount: number;
    paymentShipmentResList: {
      id: number;
      waybillId: number;
      waybillNum: string;
      service: string;
      destination: string;
      settlementWeight: number;
      payableAmount: number;
      payableAmountSum: number;
      receivableAmount: number;
      grossProfit: number;
      status: number;
    }[];
  };
  export type ApplySponsor = {
    paymentAmount: number;
    paymentDescription: string;
    payableStatementShipmentIdList: string[];
  };
  export type PayableApplyInfo = {
    id: string;
    paymentAmount: number;
    paymentDescription: string;
    applyResult: string;
    applyPaymentRes: {
      id: number;
      paymentBillNumber: string;
      payableStatementNumber: string;
      agent: string;
      payableAmount: number;
      surplusPayableAmount: number;
      paymentShipmentResList: {
        id: number;
        waybillId: number;
        waybillNum: string;
        service: string;
        destination: string;
        settlementWeight: number;
        payableAmount: number;
        payableAmountSum: number;
        receivableAmount: number;
        grossProfit: number;
        status: number;
      }[];
    }[];
  };
  // 核销费用详情
  export type WriteOffFeeInfo = {
    serials: {
      createBy: number;
      createName: string;
      createTime: string;
      updateBy: number;
      updateName: string;
      updateTime: string;
      id: string;
      tenantId: number;
      agentId: number;
      agent: string;
      payAccountId: number;
      payAccount: string;
      companyId: number;
      companyName: string;
      payAmount: number;
      unWriteAmount: number;
      writeAmount: number;
      payTime: string;
      serialNumber: string;
      remark: string;
      status: number;
      sum: number;
    }[];
    paymentApplies: {
      createBy: number;
      createName: string;
      createTime: string;
      updateBy: number;
      updateName: string;
      updateTime: string;
      id: string;
      tenantId: number;
      applyNo: string;
      agentId: number;
      agent: string;
      companyId: number;
      companyName: string;
      paymentAmount: number;
      paymentDescription: string;
      applyStatus: number;
      applyResult: string;
      applyBy: number;
      applyName: string;
      applyTime: string;
      sum: number;
      verificaStatus: number;
    }[];
  };
}
